package com.ruoyi.easyfame.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.springframework.data.annotation.Transient;

/**
 * 预约申请对象 tb_appointment
 * 
 * @author xhb
 * @date 2025-08-20
 */
public class Appointment extends BaseEntity
{
    private static final long serialVersionUID = 1L;


    private String farmerName;


    private String expertName;
    /** 预约ID */
    private Long id;

    /** 农户用户ID（关联sys_user表user_id） */
    @Excel(name = "农户用户ID", readConverterExp = "关=联sys_user表user_id")
    private Long farmerId;

    /** 专家用户ID（关联sys_user表user_id） */
    @Excel(name = "专家用户ID", readConverterExp = "关=联sys_user表user_id")
    private Long expertId;

    /** 排班ID */
    @Excel(name = "排班ID")
    private Long scheduleId;

    /** 预约日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "预约日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date appointmentDate;

    /** 预约开始时间 */
    @JsonFormat(pattern = "HH:mm:ss")
    @Excel(name = "预约开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /** 预约结束时间 */
    @JsonFormat(pattern = "HH:mm:ss")
    @Excel(name = "预约结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /** 预约标题 */
    @Excel(name = "预约标题")
    private String title;

    /** 预约描述 */
    @Excel(name = "预约描述")
    private String description;

    /** 预约状态（0待确认 1已确认 2已完成 3已取消 4已拒绝） */
    @Excel(name = "预约状态", readConverterExp = "0=待确认,1=已确认,2=已完成,3=已取消,4=已拒绝")
    private String status;

    /** 拒绝原因 */
    @Excel(name = "拒绝原因")
    private String rejectReason;


    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setFarmerId(Long farmerId) 
    {
        this.farmerId = farmerId;
    }

    public Long getFarmerId() 
    {
        return farmerId;
    }

    public void setExpertId(Long expertId) 
    {
        this.expertId = expertId;
    }

    public Long getExpertId() 
    {
        return expertId;
    }

    public void setScheduleId(Long scheduleId) 
    {
        this.scheduleId = scheduleId;
    }

    public Long getScheduleId() 
    {
        return scheduleId;
    }

    public void setAppointmentDate(Date appointmentDate) 
    {
        this.appointmentDate = appointmentDate;
    }

    public Date getAppointmentDate() 
    {
        return appointmentDate;
    }

    public void setStartTime(Date startTime) 
    {
        this.startTime = startTime;
    }

    public Date getStartTime() 
    {
        return startTime;
    }

    public void setEndTime(Date endTime) 
    {
        this.endTime = endTime;
    }

    public Date getEndTime() 
    {
        return endTime;
    }

    public void setTitle(String title) 
    {
        this.title = title;
    }

    public String getTitle() 
    {
        return title;
    }

    public void setDescription(String description) 
    {
        this.description = description;
    }

    public String getDescription() 
    {
        return description;
    }

    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }

    public void setRejectReason(String rejectReason) 
    {
        this.rejectReason = rejectReason;
    }

    public String getRejectReason() 
    {
        return rejectReason;
    }

    public String getFarmerName() {
        return farmerName;
    }

    public void setFarmerName(String farmerName) {
        this.farmerName = farmerName;
    }

    public String getExpertName() {
        return expertName;
    }

    public void setExpertName(String expertName) {
        this.expertName = expertName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("farmerId", getFarmerId())
            .append("expertId", getExpertId())
            .append("scheduleId", getScheduleId())
            .append("appointmentDate", getAppointmentDate())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("title", getTitle())
            .append("description", getDescription())
            .append("status", getStatus())
            .append("rejectReason", getRejectReason())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
